package com.htj.kf2b.construct_mobile.controller;


import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class LoginController {


     @CrossOrigin
     @RequestMapping(value = "/login",method = RequestMethod.GET)
    public JSONObject getPhone()
    {
        String phone ="15279189843" ;

        //TODO 获取code 通过code获取
        JSONObject jsonObject = JSONUtil.createObj();
        jsonObject.putOnce("code","200");
        jsonObject.putOnce("msg","成功");
        jsonObject.putOnce("phone",phone);

        return jsonObject;
    }

//      @RequestMapping(value = "/phone",method = RequestMethod.POST)
//    public String setlogin(String phone)
//    {
////        String phone ="15279189843" ;
//
//        return phone;
//    }
}
